package com.hxm.demo.huawei;


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class TestHJ4 {

    /**
     * HJ4 字符串分隔
     *
     * @param args
     */
//    public static void main(String[] args) throws IOException {
//        InputStream in = System.in;
//        char c = 0;
//        int length = 0;
//        while ('\n' != (c = (char) in.read())) {
//            length++;
//            System.out.print(c);
//            if (length == 8) {
//                length = 0;
//                System.out.println();
//            }
//        }
//        if (length!=0){
//            for (int i = 0; i < 8-length; i++) {
//                System.out.print(0);
//            }
//        }
//    }
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;
        while ((str = br.readLine()) != null) {
            int length = str.length();
            int start = 0;
            while (length > 8) {
                System.out.println(str.substring(start, start + 8));
                start += 8;
                length -= 8;
            }
            if (length > 0) {
                System.out.print(str.substring(start, start + length));
                for (int i = 0; i < 8 - length; i++) {
                    System.out.print(0);
                }
            }
        }
    }
}
